//package org.vaadin.example.cfg;
//
//import com.vaadin.flow.spring.security.AuthenticationContext;
//import org.springframework.security.core.userdetails.UserDetails;
//import org.springframework.stereotype.Component;
//
///**
// * @program: my-app
// * @description: SecurityService
// * @author: 作者名
// * @create: 2024/04/09
// */
//@Component
//public class SecurityService {
//
//    private final AuthenticationContext authenticationContext;
//
//    public SecurityService(AuthenticationContext authenticationContext) {
//        this.authenticationContext = authenticationContext;
//    }
//
//    public UserDetails getAuthenticatedUser() {
//        return authenticationContext.getAuthenticatedUser(UserDetails.class).get();
//    }
//
//    public void logout() {
//        authenticationContext.logout();
//    }
//}
